// ❤ 配置路由表 

import Home from "../views/Home" //直接在顶部引入，也叫全局引入 【缺点：会耗费首次加载的时长；有点：只会加载一次】


import { lazy } from "react"  //懒加载
const routes = [{
        path: "/home",
        component: Home,
        title:"首页"
    },
    {
        path: "/classify",
        component: lazy(() => import("../views/Classify")),
        //在路由配置中使用lazy函数引入，叫做路由懒加载【缺点：每次跳转到classify都会重新引入；优点：首次进入页面不会被加载】
        title:"分类"
    },
    {
        path: "/jingxi",
        component: lazy(() => import("../views/Jingxi")),
        title:"京喜"
    },
    {
        path:"/shopcar",
        component: lazy(()=> import("../views/ShopCar")),
        title:"购物车"
    },
    {
        path:"/my",
        component:lazy(() => import("../views/My")),
        title:"我的"
    }
]


// 抛出 
export default routes